import request from "./axios";

const api = "/api/v1";

interface ParkListParmas {
  vehType: string;
  userType: string;
  passType: passType;
}

interface DailyBookingParmas {
  userId: string;
  lpnId: string;
  tariffId: string;
  comId: string;
  pymPrice: string;
  startDate: string;
  duration: string;
  passType: passType;
}

interface QuotaParmas {
  startDate: string;
  endDate: string;
  parkId: string;
  vehType: string;
}
export const getGenerateCodeAndPic = () => {
  return request.get(`${api}/verifyCode/getCodeAndPicData`);
};

export const getCreateBooking = (params: DailyBookingParmas) => {
  return request.post(`${api}/booking/createBooking`, params);
};

export const getCarParkList = (params: ParkListParmas) => {
  return request.post(`${api}/booking/getCarParkList`, params);
};

export const getQuota = (params: QuotaParmas) => {
  return request.post(`${api}/booking/quota`, params);
};
